package com.hgw.Demo08_StatePattern.Exercises23_8_4;

/**
 * Data time:2021/12/20 18:14
 * StudentID:2019112118
 * Author:hgw
 * Description: 已打开类，充当具体状态者
 */
public class DoorOpen extends DoorState{
    public DoorOpen(Door door) {
        super(door);
    }

    @Override
    public void click() {
        System.out.println("保持打开");
        door.setState(super.door.STAYOPEN);
    }

    @Override
    public void timeout() {
        System.out.println("超时");
        door.setState(super.door.CLOSING);
    }

    @Override
    public void complete() {
        System.out.println("此时无效");
    }
}
